import javax.swing.*;
import java.util.concurrent.TimeUnit;

/**
 * @author 杨宇
 * @date Created on 2016/6/14.
 */
public class HelloLabel {
    public static void main(String[] args) throws InterruptedException {
        JFrame frame = new JFrame("hello swing");
        JLabel label = new JLabel("A Label");
        frame.add(label);
        frame.setSize(300, 100);
        frame.setVisible(true);
        TimeUnit.SECONDS.sleep(1);
        label.setText("Hey!This is Different!");
    }
}
